var app = angular.module("myApp");
app.directive("topmenu", function(){
    return {
        restrict:"E",
        replace:true,
        templateUrl:"directives/topmenu/topmenu.html",
        compile:function (element, attributes) {
            return {
                pre:function preLikn(scope, element, attributes) {
                    scope.user={
                        menus: [
                            {
                                ico:"glyphicon glyphicon-user",
                                user: "用户43名",
                                items: [
                                    {
                                        texts: "信息内容"
                                    }
                                ]
                            },
                            {
                                ico:"glyphicon glyphicon-user",
                                user: "用户122121名",
                                items: [
                                    {
                                        texts: "信息内容"
                                    }
                                ]
                            },
                            {
                                ico:"glyphicon glyphicon-user",
                                user: "用户名",
                                items: [
                                    {
                                        texts: "信息内容"
                                    }
                                ]
                            }
                        ],
                        users:[
                            {
                                ico:"glyphicon glyphicon-user",
                                username:"用户名",
                                items: [
                                    {user_list:"用户信息"},
                                    {user_list:"设定"},
                                    {user_list:"帮助"},
                                    {user_list:"登出系统"}
                                ]
                            }
                        ]
                    };
                }
            }
        },
        post: function postLink(scope, element, attributes) {
            // scope.number = scope.number + "55555 "
        }
    };
});
app.controller("myMenu",function () {
    
});